Conventionally, for example, Japanese Patent No. 3592147 proposes an image capturing apparatus including focus detection pixels discretely arranged among image forming pixels in an image sensor. According to Japanese Patent No. 3592147, the image sensor partially includes a plurality of focus detection pixels of two types (phase-difference detection pixels). FIG. 5 is a view showing an example of the pixel arrangement of an image sensor including focus detection pixels arranged on specific lines. Referring to FIG. 5, R, G, and B represent pixels with red, green, and blue filters arranged on the light entrance planes, respectively. S1 and S2 indicate focus detection pixels that have fields of view symmetrical about the optical axis center so as to attain different optical characteristics. As shown in FIG. 5, the focus detection pixels are arranged on the image sensor among the pixels that have R, G, and B color filters to obtain a color image signal.
FIG. 6 shows the structure of the first focus detection pixel S1. Referring to FIG. 6, the first focus detection pixel has a microlens 501 arranged on the top. A smoothing layer 502 constitutes a plane to form the microlens. A light-shielding layer 503 has an opening portion shifted (decentered) from the center to one side of the photoelectric conversion area of the pixel. The light-shielding layer 503 has an effect of a stop for restricting incident light. Reference numeral 504 denotes a photoelectric conversion element.
FIG. 7 shows that the structure of the second focus detection pixel S2. FIG. 7 is different from FIG. 6 whereby the opening portion of a light-shielding layer 603 is provided to be symmetrical about the optical axis center with respect to the opening portion of the light-shielding layer 503 of the first focus detection pixel. Note that reference numeral 601 denotes a microlens; 602, a smoothing layer; and 604, a photoelectric conversion element, as in FIG. 6.
In FIG. 5, as the number of pixels increases, the line including the first focus detection pixels S1 and that including the second focus detection pixels S2 form approximate images. If object light is in focus on the pixels through the imaging optical system, the image signal of the line including the first focus detection pixels S1 coincides with that of the line including the second focus detection pixels S2. If object light is out of focus, a phase difference is generated between the image signal of the line including the first focus detection pixels S1 and that of the line including the second focus detection pixels S2. A phase shift generated when light goes out of focus toward the front of the camera is opposite in direction to a phase shift generated when light goes out of focus toward the rear of the camera. When viewed from the first focus detection pixel S1 and the second focus detection pixel S2, the imaging optical system looks as if the pupil were divided symmetrically about the optical center.
FIGS. 8A and 8B are schematic views for explaining the phase shift of an image caused by defocus. Referring to FIGS. 8A and 8B, the first focus detection pixels S1 and second focus detection pixels S2 are abstractly made closer and represented by points A and B, respectively. To help understanding, the R, G, and B pixels for image capturing are not illustrated so that only the focus detection pixels are arranged as it were. Light from a specific point of an object can be divided into a light beam ΦLa which enters the point A via a pupil corresponding to the point A and a light beam ΦLb which enters the point B via a pupil corresponding to the point B. The two light beams come from the same point. Hence, if the imaging optical system has a focus on the image sensor, the light beams reach one point of a single microlens, as shown in FIG. 8A. However, if the focal point moves to the near side by, for example, a distance x, the light beams shift from each other by the change amount of the light incident angle, as shown in FIG. 8B. If the focal point moves to the far side by the distance x, the light beams shift in opposite directions.
For these reasons, the image signal formed by the array of the points A and that formed by the array of the points B coincide with each other if the imaging optical system is in focus. Otherwise, the image signals shift. The image capturing apparatus described in Japanese Patent No. 3592147 detects a focus based on the above-described principle.
However, when capturing a still image, the image sensor including the focus detection pixels suffers a loss of pixel data corresponding to the positions of the focus detection pixels. If signals obtained by the focus detection pixels are used as image signals for a still image, the continuity to the peripheral pixel signals is lost because of the different fields of view, and the image looks flawed.
To solve this problem, the image capturing apparatus described in Japanese Patent No. 3592147 interpolates the image signals corresponding to the positions of the focus detection pixels based on the image signals of the peripheral pixels. In the pixel arrangement of the image sensor shown in FIG. 5, interpolation data from the peripheral pixels are inserted in the portions S1 and S2 included in the image signals of the image capturing. Referring to FIG. 5, the R, G, and B pixels for image capturing are arrayed in a Bayer matrix. Several G pixels are replaced with the focus detection pixels S1 and S2. In place of the data of each G pixel that is lost due to the presence of the focus detection pixel S1 or S2, synthetic G pixel data is generated from the data of four adjacent G pixels located in the oblique directions, and applied as the lost G pixel data.
A conventional digital camera or the like displays an image on a liquid crystal display device or the like in a live view display mode so that the user can determine the composition by looking not through an optical viewfinder but at the liquid crystal screen. In the live view display mode, instead of reading out the image signals of all pixels of an image sensor whose pixels are growing in number, the signals of all pixels are thinned out at a predetermined ratio and then read out. When the pixel signals are thinned out, image data read out after the thinning-out does not always include the focus detection pixels. This makes it impossible to detect a focus by the phase-difference detection method.